package com.star.percalservice.model.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class DashboardDataVO {
    private UserStats userStats;
    private ResearchStats researchStats;
    private List<MonthlyStat> monthlyStats;
    private List<DepartmentStat> departmentStats;
    private List<RecentActivity> recentActivity;
    private List<PerformanceRanking> performanceRanking;

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class UserStats {
        private Integer totalUsers;
        private Integer teacherCount;
        private Integer adminCount;
    }

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class ResearchStats {
        private Integer totalProjects;
        private Integer totalPapers;
        private Integer totalPatents;
        private Integer totalAwards;
    }

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class MonthlyStat {
        private String month;
        private Integer projects;
        private Integer papers;
        private Integer patents;
        private Integer awards;
    }

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class DepartmentStat {
        private String department;
        private Integer projects;
        private Integer papers;
        private Integer patents;
        private Integer awards;
    }

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class RecentActivity {
        private Integer id;
        private String type;
        private String title;
        private String author;
        @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
        private LocalDate date;
        private String status;
    }

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class PerformanceRanking {
        private Integer rank;
        private String name;
        private String department;
        private Double score;
    }
}
